<?php
/**
 * Created by PhpStorm.
 * User: u
 * Date: 2019/4/10
 * Time: 17:33
 */

namespace common\sources\write\buyrechargerecord;

use Yii;


class BuyRechargeRecordAccess implements IBuyRechargeRecordAccess
{
    public function addBuyRechargeRecord($data)
    {
        return Yii::$app->db->createCommand()->insert('buy_recharge_record', [
            'buy_id' =>  $data['buy_id'],
            'amount' => $data['amount'],
            'rech_type' => $data['rech_type'],
            'status' => $data['pay_status'],
            'order_id' => $data['order_id'],
            'remark' => $data['remark'],
            'create_time' => time()
        ])->execute();
    }
}